//
//  SignInButton.m
//  MobileOffice
//
//  Created by jjkj on 16/10/25.
//  Copyright © 2016年 liaoningjujin. All rights reserved.
//

#import "SignInButton.h"

@implementation SignInButton


- (instancetype)initWithFrame:(CGRect)frame{
    if (self=[super initWithFrame:frame]) {
        _signLabel=[[UILabel alloc]initWithFrame:CGRectMake(8, 12, 16, 16)];
        _signLabel.layer.masksToBounds=YES;
        _signLabel.layer.cornerRadius=_signLabel.width/2;
        _signLabel.backgroundColor=[UIColor whiteColor];
        [self addSubview:_signLabel];
        
        _textLabel=[MyControl creatLabelWithFrame:CGRectMake(_signLabel.x+_signLabel.width+8, 10, frame.size.width-(_signLabel.x+_signLabel.width+8), 20) text:@""];
        _textLabel.textColor=[UIColor whiteColor];
        _textLabel.font=FONT_14;
        _textLabel.textAlignment=NSTextAlignmentCenter;
        [self addSubview:_textLabel];
    }
    return self;
}

- (void)setSelected:(BOOL)selected{
    if (selected) {
        _signLabel.backgroundColor=COLOR_SKYBLUE;
        _textLabel.textColor=COLOR_SKYBLUE;
    }else{
        _signLabel.backgroundColor=[UIColor whiteColor];
        _textLabel.textColor=[UIColor whiteColor];
    }
}
/*
// Only override drawRect: if you perform custom drawing.
// An empty implementation adversely affects performance during animation.
- (void)drawRect:(CGRect)rect {
    // Drawing code
}
*/

@end
